<template>
  <div class="home">
    <MdEditor :value="codeValue" :handle-change="onCodeChange" />
    <CodeEditor :value="mdvalue" :handle-change="onMdChange" />
    <!--    <HelloWorld msg="Welcome to Your Vue.js + TypeScript App" />-->
  </div>
</template>

<script setup lang="ts">
import { ref } from "vue";
import HelloWorld from "@/components/HelloWorld.vue";
import MdEditor from "@/components/MdEditor.vue";
import CodeEditor from "@/components/CodeEditor.vue"; // @ is an alias to /src

const mdvalue = ref();
const codeValue = ref();

const onMdChange = (v: string) => {
  mdvalue.value = v;
};

const onCodeChange = (v: string) => {
  codeValue.value = v;
};
</script>
